package com.lungolago.bank.services;

import javax.faces.event.AjaxBehaviorEvent;

import com.lungolago.bank.domain.UserEntity;

/**
 * Service providing service methods to work with user data and entity
 * 
 * @author Franco
 */
public interface UserService {
	
	/**
	 * Create user - persist to db
	 * 
	 * @param userEntity
	 * @return true if success
	 */
	boolean createUser(UserEntity userEntity);
	
	/**
	 * Check user name availability. UI ajax use.
	 * Invoked from signUp.xhtml
	 * 
	 * @param ajax event
	 * @return
	 */
	boolean checkAvailability(AjaxBehaviorEvent event);

}


